package com.zmn.oms.zmn.business.interfaces.work;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.dto.work.modify.must.OrderAssignBackDTO;
import com.zmn.oms.model.entity.detail.OrderDetail;
import com.zmn.oms.model.entity.work.OrderWork;
import com.zmn.oms.model.vo.work.OrderAssignBackVO;

/**
 * 类描述：工单分单撤回 b service
 *
 * @author liuying
 * @date 2019/05/08 18:38
 */
public interface OrderWorkAssignBackBService {

    /**
     * 获取分单公司or服务商
     *
     * @param orderId 订单Id
     * @param workId 工单Id
     * @return
     */
    OrderAssignBackVO getAssignBackVO(Long orderId, Long workId);

    /**
     * 分单撤回
     *
     * @param orderAssignBackDTO
     */
    void saveAssignBack(OrderAssignBackDTO orderAssignBackDTO) throws OmsBaseException;

    /**
     * 平台直派分单撤回，服务商派单也可使用
     * 不校验按钮状态
     * 不记录分单撤回日志
     * 平台直派不发送库存预警
     * @param orderWork
     * @param orderAssignBackDTO
     * @throws OmsBaseException
     */
    void saveGridAssignBack(OrderWork orderWork, OrderDetail orderDetail, OrderAssignBackDTO orderAssignBackDTO, Boolean isGrid) throws OmsBaseException;

}
